package converter;

import entity.Address;
import org.springframework.core.convert.converter.Converter;

public class StringToAddressConverter implements Converter<String, Address> {
    @Override
    public Address convert(String text) {
        Address address=new Address();
        String[] s=text.split("-");
        address.setProvince(s[0]);
        address.setCity(s[1]);
        return address;
    }
}
